<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .left,
      .right {
        height: 300px;
      }
      .left {
        width: 300px;
        background: tomato;
        float: left;
      }
      .right {
        background: blue;
        /* 减去左边盒子的宽度 */
        margin-left: 300px;
      }
    </style>
  </head>

  <body>
    <div class="outer">
      <div class="left"></div>
      <div class="right"></div>
    </div>
  </body>
</html>
